package org.mics.token.jwt;

import java.util.Map;

import org.mics.token.enums.TokenEnum;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 *  jwt第二部分
 * @author mics
 * @date 2020年6月9日
 * @version  1.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class JwtPayLoad {
    /**
     * 用户id
     */
    private String userId;

    /**
     * 账号
     */
    private String account;


    /**
     * 来源
     */
    private TokenEnum.TokenSource source;

    /**
     * 自定义字段
     * 如：部门id、机构id
     */
    private Map<String, Object> customFields;

    public JwtPayLoad() {
    }

    public JwtPayLoad(String userId, String account,  TokenEnum.TokenSource source) {
        this.userId = userId;
        this.account = account;
        this.source = source;
    }

    public JwtPayLoad(String userId, String account,TokenEnum.TokenSource source, Map<String, Object> customFields) {
        this.userId = userId;
        this.account = account;
        this.source = source;
        this.customFields = customFields;
    }

	
    
}
